﻿Public Class FrmBuscarPr

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim aux As Boolean = False
        For i = 0 To arrprofe.Count - 1
            If txtRut.Text = arrprofe(i).getrut() Then
                txtNombre.Text = arrprofe(i).getnombre()
                ComboBox2.Text = arrprofe(i).getsexo()
                ComboBox1.Text = arrprofe(i).gettitulo()
                txtsueldo.Text = arrprofe(i).getsueldo()
                txtRut.Focus()
                aux = True
            End If
        Next
        If aux = False Then
            MsgBox("Rut no encontrado", MsgBoxStyle.Exclamation)
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
    End Sub
End Class